﻿using HCMS.CommonDtos;
using HCMS.Dtos.Base;
using HCMS.Entities.Base;
using HCMS.Repositories.Base;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace HCMS.IServices.Base
{
    /// <summary>
    /// 公告 接收 对象 应用服务 接口
    /// </summary>
    public interface INoticeReceiveAppService : ICommonAppService<BaseDbContext, NoticeReceive>
    {
        /// <summary>
        /// 发布 公告
        /// </summary>
        /// <param name="noticeId">公告 Id</param>
        /// <param name="receiveType">接收类型</param>
        /// <param name="adminIds">指定 管理员 Ids</param>
        /// <param name="roleIds">指定 角色 Ids</param>
        /// <param name="updateUser">更新 人</param>
        /// <returns>接收公告的管理员 Ids</returns>
        Task<List<int>> ReleaseNotice(int noticeId, int[] receiveType, List<int> adminIds, List<int> roleIds, string updateUser);

        /// <summary>
        /// 管理 列表
        /// </summary>
        /// <param name="searchArgs">搜索 参数</param>
        /// <param name="pager">分页 参数</param>
        /// <returns></returns>
        Task<ListPagerDto<object>> ManageList(SearchArgsDto searchArgs, PagerArgsDto pager);

        /// <summary>
        /// 根据接收人员 Id 获取公告列表
        /// </summary>
        /// <param name="userId">接收人员 Id</param>
        /// <param name="count">最大获取数量</param>
        /// <returns></returns>
        Task<List<NoticeListByUserDto>> NoticeListByUserId(int userId, int count);

    }
}
